<?php
//设置时区
date_default_timezone_set("PRC");

define('ST_ROOT', realpath(__DIR__.'/'));
require_once ST_ROOT . '/core/core.php';
require_once ST_ROOT . '/core/mod.php';

// 覆盖配置文件
foreach(glob(ST_ROOT . '/Config/*')  as $php_file)
{
    require_once $php_file;
}

$address_array = array(
    'tcp://127.0.0.1:2015',
);
// 配置服务端列表
RpcClient::config($address_array);

$_SESSION['remoteip'] = bindec(decbin(ip2long($_SERVER['REMOTE_ADDR'])));
//var_dump($_SESSION['remoteip']);
// 加载所有文件
foreach(glob(ST_ROOT . '/Modules/*')  as $php_file)
{
    require_once $php_file;
}